#include "CzCommon.h"
#include <QMessageBox>

void CzMessageBox::information(QString title, QString text)
{
	QMessageBox msgBox(QMessageBox::Information, title, text);
	msgBox.setWindowFlag(Qt::WindowStaysOnTopHint);
	msgBox.exec();
}
void CzMessageBox::warning(QString title, QString text)
{
	QMessageBox msgBox(QMessageBox::Warning, title, text);
	msgBox.setWindowFlag(Qt::WindowStaysOnTopHint);
	msgBox.exec();
}
void CzMessageBox::critical(QString title, QString text)
{
	QMessageBox msgBox(QMessageBox::Critical, title, text);
	msgBox.setWindowFlag(Qt::WindowStaysOnTopHint);
	msgBox.exec();
}
int CzMessageBox::question(QString title, QString text, QString yes, QString no)
{
	QMessageBox msgBox(QMessageBox::Question, title, text, QMessageBox::Yes | QMessageBox::No);
	msgBox.setButtonText(QMessageBox::Yes, QString(yes));
	msgBox.setButtonText(QMessageBox::No, QString(no));
	msgBox.setWindowFlag(Qt::WindowStaysOnTopHint);
	return msgBox.exec();
}